<script setup lang="ts">
  import { getNotices } from '/@/apis/userApi';
  import { useRequest } from 'vue-request';
  import { ref, onMounted } from 'vue';
  const noticesData = ref('');
  onMounted(() => {
    useRequest(getNotices, {
      defaultParams: [{ noticeType: 'privacyPolicy', global: localStorage.getItem('lang') }],
      onSuccess(data: any) {
        console.log(data);
        noticesData.value = data[0].content;
      },
    });
  });
</script>
<template>
  <div>
    <AppBar class="app_bar" back :primary="true" :title="$t('Privacy')" />
    <div class="content" v-html="noticesData"></div>
  </div>
</template>
<style scoped>
  .content {
    padding: 20px 30px;
    height: calc(100vh - 120px);
    overflow: auto;
  }
</style>
